﻿<%@ Page Language="C#" MasterPageFile="~/Admin/admin.master" AutoEventWireup="true"
    CodeFile="DrugDispo.aspx.cs" Inherits="Admin_DrugDispo" Title="DrugDispo List" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="Server">
    Drug Dispo List</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <data:GridViewSearchPanel ID="GridViewSearchPanel1" runat="server" GridViewControlID="GridView1"
        PersistenceMethod="Session" />
    <br />
    <data:EntityGridView ID="GridView1" runat="server" AutoGenerateColumns="False" OnSelectedIndexChanged="GridView1_SelectedIndexChanged"
        DataSourceID="DrugDispoDataSource" DataKeyNames="DrugId" AllowMultiColumnSorting="false"
        AllowPaging="True" DefaultSortColumnName="" DefaultSortDirection="Ascending"
        ExcelExportFileName="Export_DrugDispo.xls">
        <Columns>
            <asp:CommandField ShowSelectButton="True" />
            <asp:BoundField DataField="DrugId" HeaderText="Drug Id" SortExpression="[DrugId]"
                ReadOnly="True" />
            <asp:BoundField DataField="DrugName" HeaderText="Drug Name" SortExpression="[DrugName]" />
            <asp:BoundField DataField="GenericName" HeaderText="Generic Name" SortExpression="[GenericName]" />
            <asp:CheckBoxField DataField="IsControlDrug" HeaderText="Is Control Drug"
                SortExpression="[IsControlDrug]"/>
            <data:HyperLinkField HeaderText="Unit" DataNavigateUrlFormatString="UnitTableEdit.aspx?Unit={0}"
                DataNavigateUrlFields="Unit" DataContainer="UnitSource" DataTextField="Unit" />
            <asp:BoundField DataField="Shelf" HeaderText="Shelf" SortExpression="[Shelf]" />
            <data:HyperLinkField HeaderText="Classification Id" DataNavigateUrlFormatString="ClassificationEdit.aspx?ClassificationId={0}"
                DataNavigateUrlFields="ClassificationId" DataContainer="ClassificationIdSource"
                DataTextField="ClassificationName" />
            <data:HyperLinkField HeaderText="Group Id" DataNavigateUrlFormatString="GroupEdit.aspx?GroupId={0}"
                DataNavigateUrlFields="GroupId" DataContainer="GroupIdSource" DataTextField="GroupName" />
            <asp:BoundField DataField="CostPrice" HeaderText="Cost Price" SortExpression="[CostPrice]"
                DataFormatString="{0:#,##0.00}">
                <ItemStyle HorizontalAlign="Right" />
            </asp:BoundField>
            <asp:BoundField DataField="SellPrice" HeaderText="Sell Price" SortExpression="[SellPrice]"
                DataFormatString="{0:#,##0.00}">
                <ItemStyle HorizontalAlign="Right" />
            </asp:BoundField>
            <asp:BoundField DataField="MinStock" HeaderText="Min Stock" SortExpression="[MinStock]" />
        </Columns>
        <EmptyDataTemplate>
            <b>No DrugDispo Found!</b>
        </EmptyDataTemplate>
    </data:EntityGridView>
    <br />
    <asp:Button runat="server" ID="btnDrugDispo" OnClientClick="javascript:location.href='DrugDispoAdd.aspx'; return false;"
        Text="Add New" CssClass="button"></asp:Button>
    <data:DrugDispoDataSource ID="DrugDispoDataSource" runat="server" SelectMethod="GetPaged"
        EnablePaging="True" EnableSorting="True" EnableDeepLoad="True">
        <DeepLoadProperties Method="IncludeChildren" Recursive="False">
            <Types>
                <data:DrugDispoProperty Name="Classification" />
                <data:DrugDispoProperty Name="Group" />
                <data:DrugDispoProperty Name="MarkUpType" />
                <data:DrugDispoProperty Name="UnitTable" />
                <%--<data:DrugDispoProperty Name="GrnDetailsCollection" />--%>
                <%--<data:DrugDispoProperty Name="StockCollection" />--%>
                <%--<data:DrugDispoProperty Name="PoDetailsCollection" />--%>
                <%--<data:DrugDispoProperty Name="DrugDiscountCollection" />--%>
                <%--<data:DrugDispoProperty Name="PrescriptionDetailCollection" />--%>
            </Types>
        </DeepLoadProperties>
        <Parameters>
            <data:CustomParameter Name="WhereClause" Value="" ConvertEmptyStringToNull="false" />
            <data:CustomParameter Name="OrderByClause" Value="" ConvertEmptyStringToNull="false" />
            <asp:ControlParameter Name="PageIndex" ControlID="GridView1" PropertyName="PageIndex"
                Type="Int32" />
            <asp:ControlParameter Name="PageSize" ControlID="GridView1" PropertyName="PageSize"
                Type="Int32" />
            <data:CustomParameter Name="RecordCount" Value="0" Type="Int32" />
        </Parameters>
    </data:DrugDispoDataSource>
</asp:Content>
